import { activeOrOpenFloatPane, registerAppMenu } from '@/app'
import AirDataCalcVue from './AirDataCalc.vue'
import SpeedChartVue from './SpeedChart.vue'

export { AirData, AtmosphereModel, ISA, transitionAltitude } from './core'

export async function setup() {
  registerAppMenu({
    path: '工具/atmosphere:大气模型-空气计算器',
    onClick() {
      activeOrOpenFloatPane({
        key: '@@atmos-air-calc',
        name: '大气模型-空气计算器',
        component: AirDataCalcVue
      })
    }
  })
  registerAppMenu({
    path: '工具/atmosphere:大气模型-速度换算',
    onClick() {
      activeOrOpenFloatPane({
        key: '@@atmos-spd-chart',
        name: '大气模型-速度换算',
        component: SpeedChartVue
      })
    }
  })
}
